<div class="topimg">
  <img align="center" src="/images/order_img.png"/>
</div>
<div class="search order_detail">
    <%= "<p style='color: green'>#{flash[:notice]}</p>" if flash[:notice] %>
  <fieldset class="demo">
    <legend>支付方式</legend> <div><%=@webconfig.content %></div>
  </fieldset>

  <fieldset class="demo">
    <legend>订单信息</legend>
    <table width="100%" class="table">
      <tr><th>邮箱:</th><td > <%=h @order.email %></td><th>收货人电话:</th><td><%=h @order.phone_number %></td></tr>
      <tr><th>收货人:</th><td><%=h @order.ship_to_name %></td><th>收货地址:</th><td ><%=h @order.ship_to %></td></tr>
      <tr><th>送货邮编:</th><td><%=h @order.ship_to_code %></td><th >订单状态:</th><td><%=h @order.status %></td></tr>
      <td></td>
    </table>
    
  </fieldset>
  <fieldset class="demo">
    <legend>购物车清单:</legend>

    <table width="100%" class="table1">
      <tr><th>产品ID</th><th>产品名称</th><th>产品价格</th><th>产品数量</th><th>总价</th></tr>
      <% @order.order_items.each do |item| %>
        <tr><td><%=item.id%></td><td><%= item.product.name%></td><td><%=number_to_currency(item.price,:unit=>"￥",:precision=>2)%></td><td><%=item.amount%></td><td>
        <%=number_to_currency(item.price * item.amount,:unit=>"￥",:precision=>2)%></td></tr>
      <% end %>
      <tr>
        <td colspan="5"><div class="align_right"><strong class="redcolor">应付总额: <%= number_to_currency @order.total,:unit=>"￥",:precision=>2 %></strong></div></td>
      </tr>
    </table>

  </fieldset>

</div>


